<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>数组的定义和使用</title>
	</head>
	<body>
		<script>
			var a=new Array();
			a[0]=4;
			a[1]=5;
			
			var a2=new Array("a","b","c");
			a2[5]="g";
			
			var a3=["java","mysql","javaScript"];
			a3[2]="c";
			
			console.log(a2[4]);
			console.log(a2[5]);
			console.log(a2.length);
			console.log(a3[2]);
			
			console.log("数组a2中的元素");
			for (var i = 0; i <a2.length; i++) {
				console.log(a2[i]);
			}
			
			
		</script>
	</body>
</html>
